package com.relytosoft.mizar.media.display.api.entity;

/**
 * 视图资源类
 *
 * @author hj
 * @version 1.0
 * @date 2022/4/22 16:21
 * @ClassName ViewForm
 */
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.relytosoft.dubhe.common.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;


@TableName("VID_VIEW_FORM")
@ApiModel("ViewForm")
public class ViewForm extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value="ID", type= IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    @NotBlank(message = "主键ID不能为空")
    private Integer id;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称", required = true)
    @TableField("NAME")
    @NotBlank(message = "名称不能为空")
    private String name;

    /**
     * 父ID
     */
    @ApiModelProperty(value = "父ID", required = true)
    @TableField("PARENT_ID")
    @NotBlank(message = "父ID不能为空")
    private Integer parentId;

    /**
     * 类型;1公有视图   2私有视图
     */
    @ApiModelProperty(value = "类型;1公有视图   2私有视图")
    @TableField("TYPE")
    private Integer type;

    /**
     * 视图类型;1视图组  2视图
     */
    @ApiModelProperty(value = "视图类型;1视图组  2视图")
    @TableField("VIEW_TYPE")
    private Integer viewType;

    /**
     * 视图布局
     */
    @ApiModelProperty(value = "视图布局")
    @TableField("LAYOUT")
    private Integer layout;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序", required = true)
    @TableField("SORT")
    @NotBlank(message = "排序不能为空")
    private Integer sort;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态", required = true)
    @TableField("STATUS")
    @NotBlank(message = "状态不能为空")
    private Integer status;

    /**
     * 拥有人
     */
    @ApiModelProperty(value = "拥有人")
    @TableField("OWNER_ID")
    private Integer ownerId;

    @ApiModelProperty(value = "祖级标签")
    @TableField("ANCESTOR")
    private String ancestor;


    /**
     * 获得主键ID
     */
    public Integer getId(){
        return this.id;
    }
    /**
     * 设置主键ID
     */
    public void setId(Integer id){
        this.id = id;
    }

    /**
     * 获得名称
     */
    public String getName(){
        return this.name;
    }
    /**
     * 设置名称
     */
    public void setName(String name){
        this.name = name;
    }

    /**
     * 获得父ID
     */
    public Integer getParentId(){
        return this.parentId;
    }
    /**
     * 设置父ID
     */
    public void setParentId(Integer parentId){
        this.parentId = parentId;
    }

    /**
     * 获得类型;1公有视图   2私有视图
     */
    public Integer getType(){
        return this.type;
    }
    /**
     * 设置类型;1公有视图   2私有视图
     */
    public void setType(Integer type){
        this.type = type;
    }

    /**
     * 获得视图类型;1视图组  2视图
     */
    public Integer getViewType(){
        return this.viewType;
    }
    /**
     * 设置视图类型;1视图组  2视图
     */
    public void setViewType(Integer viewType){
        this.viewType = viewType;
    }

    /**
     * 获得视图布局
     */
    public Integer getLayout(){
        return this.layout;
    }
    /**
     * 设置视图布局
     */
    public void setLayout(Integer layout){
        this.layout = layout;
    }

    /**
     * 获得备注
     */
    public String getRemark(){
        return this.remark;
    }
    /**
     * 设置备注
     */
    public void setRemark(String remark){
        this.remark = remark;
    }

    /**
     * 获得排序
     */
    public Integer getSort(){
        return this.sort;
    }
    /**
     * 设置排序
     */
    public void setSort(Integer sort){
        this.sort = sort;
    }

    /**
     * 获得状态
     */
    public Integer getStatus(){
        return this.status;
    }
    /**
     * 设置状态
     */
    public void setStatus(Integer status){
        this.status = status;
    }

    /**
     * 获得拥有人
     */
    public Integer getOwnerId(){
        return this.ownerId;
    }
    /**
     * 设置拥有人
     */
    public void setOwnerId(Integer ownerId){
        this.ownerId = ownerId;
    }

    @Override
    public String toString() {
        return "ViewForm{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", parentId=" + parentId +
                ", type=" + type +
                ", viewType=" + viewType +
                ", layout=" + layout +
                ", remark='" + remark + '\'' +
                ", sort=" + sort +
                ", status=" + status +
                ", ownerId=" + ownerId +
                ", ancestor='" + ancestor + '\'' +
                '}';
    }

    public String getAncestor() {
        return ancestor;
    }

    public void setAncestor(String ancestor) {
        this.ancestor = ancestor;
    }
}